package com.zry.study

import android.view.View
import com.zry.study.bean.User
import com.zry.study.databinding.ActivityMainBinding
import com.zry.study.mvp.presenter.MainPresenter
import com.zry.study.ui.base.BaseActivity
import kotlinx.android.synthetic.main.common_title.*

class MainActivity : BaseActivity() {
	
	private var mainBinding: ActivityMainBinding? = null
	private var mainPresenter: MainPresenter? = null
	
	override fun getLayoutId(): Int {
		return R.layout.activity_main
	}
	
	override fun initData() {
		mainBinding = viewDataBinding as ActivityMainBinding?
		mainPresenter = MainPresenter(this, viewDataBinding as ActivityMainBinding)
		val userInfo: User.UserInfo = User.UserInfo("房价洼地哦给后人·1额外", "hguiwedgfbpiw ", "uiedwhgfpuweg")
		mainBinding?.userInfo = userInfo
		mainBinding?.handler = MainPresenter(this, mainBinding!!)
		
		initView()
		
	}
	
	private fun initView() {
		titleCenterText.text = "首页"
		commonLeftLinearLayout.visibility = View.GONE
	}
}

